package com.etc.RCCPU005.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

import com.etc.RCCPU005.pojo.Product;

@Mapper
public interface ProductMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Product record);

    int insertSelective(Product record);

    Product selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Product record);

    int updateByPrimaryKeyWithBLOBs(Product record);

    int updateByPrimaryKey(Product record);
    
    @Select("select * from product_typ")
	List<Map> selectAllProducts();
	
	@Select("SELECT * FROM product WHERE tid = #{id}")
	List<Map> selectAllProductsByType(@Param("id")String tid);
}